-- 补足中央区花色的记录
local skel = fk.CreateSkill{
  name = "#CenterSuitComplete",
}

local DIY = require "packages.diy_utility.diy_utility"

skel:addEffect(fk.BeforeCardsMove, {
  priority = 0.0001,
  global = true,
  mute = true,
  can_trigger = Util.TrueFunc,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local suits = {}
    for _, id in ipairs(DIY.getCenterCards(room)) do
      local suit = Fk:getCardById(id).suit
      if suit ~= Card.NoSuit then
        table.insertIfNeed(suits, suit)
      end
    end
    room:setBanner("#CenterSuitComplete", #suits == 4) --是否已有4花色
  end
})

return skel